/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @author: jin Chen 
 * @date: Jun 8, 2005$
 * @version: 1.0
 */
package edu.psu.geovista.app.hce.clustering.similarity;

import edu.psu.geovista.app.hce.clustering.similarity.attribute.EuclideanSimilarity;
import edu.psu.geovista.app.hce.clustering.similarity.attribute.SimilarityComparator;


public abstract class BasicSimilarityWorker implements SimilarityWorker {
    private static final boolean DEBUG=false;
    protected SimilarityComparator simMethod;//Similarity comparator

    protected BasicSimilarityWorker() {
        this.simMethod = new EuclideanSimilarity();//by default, calculate similarity btw numeric data
    }

    public static void testPrint(float[][] floatarray){
        int w = floatarray.length;
        int h = floatarray[0].length;
        double[][] darray=new double[w][h];
        for (int i=0;i<w;i++){
            for (int j=0;j<h;j++){
                darray  [i][j]=floatarray[i][j];
            }
        }
      // if(DEBUG)
       // testPrint(darray);
    }



    public void setSimMethod(SimilarityComparator simMethod) {
        this.simMethod = simMethod;
    }

    public SimilarityComparator getSimMethod() {
        return simMethod;
    }
}
